/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.ronin.service;

import com.ronin.dao.api.IFirmaDao;
import com.ronin.model.Firma;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 *
 * @author esimsek
 */
@Service(value = "firmaService")
@Transactional(readOnly =true, propagation = Propagation.SUPPORTS)
public class FirmaService implements IFirmaService {
    
    @Autowired
    IFirmaDao iFirmaDao;

    @Override
    public Firma getSingle(Firma firma) {
        return iFirmaDao.getSingle(firma);
    }

    @Override
    public Firma getSingleById(Long id) {
        return iFirmaDao.getSingleById(id);
    }

    @Override
    public Firma getSingleOneByNamedQuery(String namedQuery,Object... parameters) {
        return iFirmaDao.getSingleOneByNamedQuery(namedQuery,parameters);
    }

    @Override
    public List<Firma> getList(Firma firma) {
        return iFirmaDao.getList(firma);
    }

    @Override
    public List<Firma> getListByNamedQuery(String namedQuery,Object... parameters) {
        return iFirmaDao.getListByNamedQuery(namedQuery,parameters);
    }

    @Override
    public int getCount(Firma firma) {
        return iFirmaDao.getCount(firma);
    }

    @Override
    @Transactional(readOnly = false, propagation = Propagation.REQUIRED)
    public void add(Firma firma) {
        iFirmaDao.add(firma);
    }

    @Override
    @Transactional(readOnly = false, propagation = Propagation.REQUIRED)
    public void update(Firma firma) {
        iFirmaDao.update(firma);
    }

    @Override
    @Transactional(readOnly = false, propagation = Propagation.REQUIRED)
    public void delete(Firma firma) {
        iFirmaDao.delete(firma);
    }

}
